﻿using System;

namespace Shuba.Model
{
    [Serializable]
    public class UserInfo
    {
        public UserInfo()
        {
        }

        public UserInfo(int id, string userCode, string nip, string name, string branchId, string userType, string appId, int groupId, bool isactive, bool islogin, DateTime logindate, string loginaddr, string EmailAddr)
        {
            this.Id = id;
            this.UserCode = userCode;
            this.Nip = nip;
            this.Name = name;
            this.BranchId = branchId;
            this.UserType = userType;
            this.AppId = appId;
            this.GroupId = groupId;
            this.IsActive = isactive;
            this.IsLogin = islogin;
            this._LoginDate = logindate;
            this.LoginAddr = loginaddr;
            this.EmailAddr = EmailAddr;
        }

        /// <summary>
        /// User CO Info
        /// </summary>
        public UserInfo(int Id, string UserCode, string Nip, string Name)
        {
            this.Id = Id;
            this.UserCode = UserCode;
            this.Nip = Nip;
            this.Name = Name;
        }

        /// <summary>
        /// untuk list user application penambahan informasi groupnya
        /// </summary>
        public UserInfo(string nip, string name, string appId, int groupId, string GroupName)
        {
            this.Nip = nip;
            this.Name = name;
            this.AppId = appId;
            this.GroupId = groupId;
            this.GroupName = GroupName;
        }

        public int Id { get; set; }
        public string UserCode { get; set; }
        public string Nip { get; set; }
        public string Name { get; set; }
        public string BranchId { get; set; }
        public string UserType { get; set; }
        public string AppId { get; set; }
        public int GroupId { get; set; }
        public string GroupName { get; set; }
        public bool IsActive { get; set; }
        public bool IsLogin { get; set; }
        private DateTime _LoginDate = DateTime.Now;
        public DateTime LoginDate
        {
            get { return _LoginDate; }
            set { _LoginDate = value; }
        }
        public string LoginAddr { get; set; }
        public string EmailAddr { get; set; }
        
    }
}
